home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et-2_2.lha / et2.2 / src / DevBitmap.h < prev    next >
C/C++ Source or Header  |  1990-11-28  |  910b  |  38 lines

  1. #ifndef DevBitmap_First
  2. #ifdef __GNUG__
  3. #pragma once
  4. #endif
  5. #define DevBitmap_First
  6.  
  7. #include "Root.h"
  8. #include "Types.h"
  9. #include "Point.h"
  10.  
  11. class DevBitmap : public Root {
  12. public:
  13.     Point size;
  14.     u_short *image;
  15.     u_short depth;
  16. protected:
  17.     DevBitmap(Point sz, u_short *data, u_short depth= 1);
  18. public:
  19.     virtual int BytesPerLine();
  20.     virtual void SetPixel(u_int x, u_int y, int value);
  21.     virtual int GetPixel(u_int x, u_int y);
  22.     virtual void SetByte(u_int x, u_int y, u_int value);
  23.     virtual u_int GetByte(u_int x, u_int y);
  24.     virtual void GetColormapEntry(int x, int *r, int *g, int *b);
  25.     virtual void SetColormapEntry(int x, int r, int g, int b);
  26.     virtual int GetColormapSize();
  27.     virtual void SetColormapSize(int);
  28.     Point Size()
  29.     { return size; }
  30.     int Depth()
  31.     { return depth; }
  32.     int ShortsPerLine()
  33.     { return ((size.x-1)/16+1)*depth; }
  34. };
  35.  
  36. #endif DevBitmap_First
  37.  
  38.